<?php

namespace Keio\StudyBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Blog
 */
class Blog
{
    /**
     * @var integer
     */
    private $id;

    /**
     * @var string
     */
    private $title;

    /**
     * @var string
     */
    private $blog;

    /**
     * @var \DateTime
     */
    private $datetime;

    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $comment;

    /**
     * @var \Keio\StudyBundle\Entity\Blogcategory
     */
    private $category;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->comment = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Blog
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set blog
     *
     * @param string $blog
     * @return Blog
     */
    public function setBlog($blog)
    {
        $this->blog = $blog;

        return $this;
    }

    /**
     * Get blog
     *
     * @return string
     */
    public function getBlog()
    {
        return $this->blog;
    }

    /**
     * Set datetime
     *
     * @param \DateTime $datetime
     * @return Blog
     */
    public function setDatetime($datetime)
    {
        $this->datetime = $datetime;

        return $this;
    }

    /**
     * Get datetime
     *
     * @return \DateTime
     */
    public function getDatetime()
    {
        return $this->datetime;
    }

    /**
     * Add comment
     *
     * @param \Keio\StudyBundle\Entity\Blogcomment $comment
     * @return Blog
     */
    public function addComment(\Keio\StudyBundle\Entity\Blogcomment $comment)
    {
        $this->comment[] = $comment;

        return $this;
    }

    /**
     * Remove comment
     *
     * @param \Keio\StudyBundle\Entity\Blogcomment $comment
     */
    public function removeComment(\Keio\StudyBundle\Entity\Blogcomment $comment)
    {
        $this->comment->removeElement($comment);
    }

    /**
     * Get comment
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getComment()
    {
        return $this->comment;
    }

    /**
     * Set category
     *
     * @param \Keio\StudyBundle\Entity\Blogcategory $category
     * @return Blog
     */
    public function setCategory(\Keio\StudyBundle\Entity\Blogcategory $category = null)
    {
        $this->category = $category;

        return $this;
    }

    /**
     * Get category
     *
     * @return \Keio\StudyBundle\Entity\Blogcategory
     */
    public function getCategory()
    {
        return $this->category;
    }
    /**
     * @var \Keio\StudyBundle\Entity\User
     */
    private $user;


    /**
     * Set user
     *
     * @param \Keio\StudyBundle\Entity\User $user
     * @return Blog
     */
    public function setUser(\Keio\StudyBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \Keio\StudyBundle\Entity\User
     */
    public function getUser()
    {
        return $this->user;
    }
    /**
     * @var \DateTime
     */
    private $datemodif;


    /**
     * Set datemodif
     *
     * @param \DateTime $datemodif
     * @return Blog
     */
    public function setDatemodif($datemodif)
    {
        $this->datemodif = $datemodif;

        return $this;
    }

    /**
     * Get datemodif
     *
     * @return \DateTime
     */
    public function getDatemodif()
    {
        return $this->datemodif;
    }

    //dành cho form để delete
    private $delform;
    public function setDelform($delform){
    	$this->delform = $delform;
    }
    public function getDelform(){
    	return $this->delform;
    }
}